define(
		[ "PDUtilDir/util", "PDUtilDir/grid", "PDUtilDir/slidebar", "PDUtilDir/validator" ],
		function(Util, Grid, Slidebar, validator) {
			function LeaderSupportInit($scope, $compile) {
				return new LeaderSupport($scope, $compile);
			}
			function LeaderSupport($scope, $compile) {
				this.$scope = $scope;
				this.$compile = $compile;
			}
			LeaderSupport.fn = LeaderSupport.prototype;
			LeaderSupport.fn.init = function(id) {
				this.entity = {
					groupId : id
				};
				this.validator = validator;
			}
			LeaderSupport.fn.digest = function() {
				this.$scope.$digest();
			}
			LeaderSupport.fn.run = function(id) {
				var _this = this;
				_this.init(id);
				_this.slidebars = Slidebar({
					size : 'lg',
					url : getServer() + "/static/app/group/groupInfos/views/leader.html",
					$scope : this.$scope,
					$compile : this.$compile,
					afterLoad : function() {
						_this.initialization();
					}
				});
			};
			LeaderSupport.fn.initialization = function() {};
			LeaderSupport.fn.save = function() {
				var _this = this;
				$.ajax({
					url : getServer() + "/flea/hclv/htravelGroup/addGroupChargerPerson.htmls",
					data : {
						model: JSON.stringify(_this.entity)
					},
					success : function(data) {
						Util.alert(data.message);
						if(data.status != 200){
							return
						}
						_this.slidebars.close();
						_this.$scope.grid.reload();
					}
				});
			};
			return LeaderSupportInit;
		});